package com.mlyol.single;

public class Method3 {
    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle();
        vehicle.run("摩托车");
        vehicle.runAir("飞机");
        vehicle.runWater("轮船");
    }

    static class Vehicle {

        void run(String vehicle) {
            System.out.println(vehicle + " 在公路上跑");
        }

        void runWater(String vehicle) {
            System.out.println(vehicle + " 在水中运行");
        }

        void runAir(String vehicle) {
            System.out.println(vehicle + " 在空中飞");
        }

    }

}
